$OpenBSD: patch-Ck_cpp,v 1.2 2013/04/18 12:00:45 gonzalo Exp $
Keep track of the successful consolekit session opening
--- Ck.cpp.orig	Mon Dec 31 10:03:42 2012
+++ Ck.cpp	Mon Apr 15 12:52:25 2013
@@ -101,6 +101,7 @@ namespace Ck {
 
   void Session::open_session(const std::string &display, uid_t uid)
   {
+	session = false;
 	ckc = ck_connector_new();
 
 	if(!ckc)
@@ -113,6 +114,7 @@ namespace Ck {
 		throw Exception(__func__, "cannot open ConsoleKit session: OOM, DBus system bus "
 						" not available or insufficient privileges");
 	}
+	session = true;
   }
 
   const char * Session::get_xdg_session_cookie()
